import 'package:flutter/material.dart';
import 'package:reader_app/page_card/base_card.dart';

///本周推荐页面卡片
class CardRecommend extends BaseCard {
  @override
  _CardRecommend createState() => _CardRecommend();
}

class _CardRecommend extends BaseCardState {
  @override
  void initState() {
    subTitleColor = Color(0xffb99444);
    super.initState();
  }

  @override
  Widget topTitle(String topTitle) {
    return super.topTitle("本周推荐");
  }

  @override
  Widget subTitle(String title) {
    return super.subTitle("送你一天会员卡，全场书籍免费读读 >");
  }

  @override
  Widget bottomContent() {
    return new Expanded(
        child: new Container(
      //这里直接使用Image 未充满屏幕，扩展约束
      constraints: BoxConstraints.expand(),
      child: Image.network(
        "https://www.devio.org/io/flutter_beauty/card_1.jpg",
        fit: BoxFit.cover,
      ),
    ));
  }
}
